package com.itheima.utils;

import org.springframework.util.DigestUtils;

public class Md5Utils {
    /**
     * <p>Description: md5的多重加盐加密处理</p>
     *
     * @author liuyiming
     * @date 2022-10-06 15:36
     * @version 1.0.0
     */
    public static String md5Password(String password) {
        String salt = "abcd";
        password = DigestUtils.md5DigestAsHex(password.getBytes());
        password = DigestUtils.md5DigestAsHex((password+salt).getBytes());
        password = DigestUtils.md5DigestAsHex((password+salt).getBytes());
        return password;
    }
}
